import request from '@/utils/request'

const apiUrl = '/api/resignation'

// 保存或更新员工离职信息
export function saveResignation(data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

// 获取员工离职信息分页列表
export function getResignationPage(params) {
    return request({
        url: `${apiUrl}/page`,
        method: 'get',
        params
    })
}

// 根据ID获取员工离职信息
export function getResignationById(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'get'
    })
}

// 根据ID删除员工离职信息
export function deleteResignation(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'delete'
    })
} 